]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
js: Stop using Gio._LocalFilePrototype
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 10 Feb 2022 23:15:27 +0000 (00:15 +0100)
committerMarge Bot <marge-bot@gnome.org>
Fri, 11 Feb 2022 16:24:01 +0000 (16:24 +0000)
gjs now supports overriding interface methods, so promisify()
works on Gio.File itself, not just the LocalFilePrototype cludge.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2174>

js/ui/background.js
js/ui/environment.js
js/ui/main.js

index 281ef37e6e204a6a3ea38fc66dab20217bc5cb8c..7a22e803bb08c8123cd893941b196b86d9b5a027 100644 (file)
@@ -101,7 +101,7 @@ const LoginManager = imports.misc.loginManager;
 const Main = imports.ui.main;
 const Params = imports.misc.params;
 
-Gio._promisify(Gio._LocalFilePrototype, 'query_info_async', 'query_info_finish');
+Gio._promisify(Gio.File.prototype, 'query_info_async', 'query_info_finish');
 
 var DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2e3436ff);
 
index dc9c5c9433271651e060eba24bd0711e2b6e8f31..37c854cc36ac7d1da70308d16d1488f3d49a23eb 100644 (file)
@@ -372,10 +372,10 @@ function init() {
         },
     });
 
-    Gio._LocalFilePrototype.touch_async = function (callback) {
+    Gio.File.prototype.touch_async = function (callback) {
         Shell.util_touch_file_async(this, callback);
     };
-    Gio._LocalFilePrototype.touch_finish = function (result) {
+    Gio.File.prototype.touch_finish = function (result) {
         return Shell.util_touch_file_finish(this, result);
     };
 
index d0fd97861ea69a4252d7d0bc00e830d9f9c44b1c..8fa25bc43cdc5ba6c087861420b6e0dff3137220 100644 (file)
@@ -100,8 +100,8 @@ let _themeResource = null;
 let _oskResource = null;
 let _iconResource = null;
 
-Gio._promisify(Gio._LocalFilePrototype, 'delete_async', 'delete_finish');
-Gio._promisify(Gio._LocalFilePrototype, 'touch_async', 'touch_finish');
+Gio._promisify(Gio.File.prototype, 'delete_async', 'delete_finish');
+Gio._promisify(Gio.File.prototype, 'touch_async', 'touch_finish');
 
 let _remoteAccessInhibited = false;